﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using DAL;

namespace BLL
{
    public class BAccreditation
    {
        private readonly DAL.DAccreditation _dAccreditation = new DAccreditation();

        public int CheckIdentityInfo(string id, string password)
        {
            return _dAccreditation.CheckIdentityInfo(id, password);
        }

        public Model.DriverIdentityInfo GetModel(string cardid)
        {
            return _dAccreditation.GetModelByIdCard(cardid);
        }
         
        public bool ChangePassword(string driverId, string oldPassword, string newPassworld)
        {
            return _dAccreditation.ChangePassword(driverId, oldPassword, newPassworld);
        }

        public bool ExistPhoneNumber(string phoneNumber)
        {
            return _dAccreditation.ExistPhoneNumber(phoneNumber);
        }

        public Model.DriverIdentityInfo CheckIdentityWithReturn(string cardid, string password)
         {
             return _dAccreditation.CheckIdentityWithReturn(cardid, password);
         }

        public Model.DriverIdentityInfo GetModelByPhoneNumber(string phoneNum)
        {
            return _dAccreditation.GetModelByPhoneNumber(phoneNum);
        }
    }
}
